CREATE TABLE ServiceType
(
	ID INT IDENTITY(1,1),
	[Name] VARCHAR(100),
	CONSTRAINT PK_ServiceID PRIMARY KEY(ID)
)
GO
CREATE TABLE ServiceSubType
(
	ID INT IDENTITY(1,1),
	[Name] VARCHAR(100),
	CONSTRAINT PK_SubTypeID PRIMARY KEY(ID)
)
CREATE TABLE ServiceAttendance
(
	ID INT IDENTITY(1,1),
	[Name] VARCHAR(100),
	CONSTRAINT PK_AttendanceID PRIMARY KEY(ID)
)
CREATE TABLE ReferralProcess
(
	ID INT IDENTITY(1,1),
	[Name] VARCHAR(100),
	CONSTRAINT PK_ReferralProcessID PRIMARY KEY(ID)
)
CREATE TABLE FundingSource
(
	ID INT IDENTITY(1,1),
	[Name] VARCHAR(100),
	CONSTRAINT PK_FundingSourceID PRIMARY KEY(ID)
)

CREATE TABLE Account
(
	[FullName] NVARCHAR(100),
	[AccountName] VARCHAR(100),
	[Password] VARCHAR(100),
	[Email] VARCHAR(100),
	[Phone] VARCHAR(100),
	[Address] NVARCHAR(300)
	CONSTRAINT PK_AccountName PRIMARY KEY (AccountName)
)
GO
/****** Object:  Table [dbo].[Funders]    Script Date: 08/29/2012 13:41:02 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Funders](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[FundingSource] [nvarchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[ContactID] [int] NOT NULL,
	[FundingAmount] [float] NOT NULL,
	[FundingNeeds] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[FundingContinuationNeed] [bit] NULL,
	[FundingStart] [datetime] NULL,
	[FundingEnd] [datetime] NULL,
	[FundingCotinuationAmount] [float] NULL,
	[FundingContinuationDetail] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[FundrasingForText] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[FundrasingNeeds] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[FundrasingWhy] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[FundrasingComplete] [bit] NULL,
	[FundrasingRequireBy] [datetime] NULL,
	[FundrasingDonorAnonymous] [bit] NULL,
	[FundrasingDonorAmount] [float] NULL,
	[FundrasingDonationDate] [datetime] NULL,
	[FundrasingDonationIncremental] [bit] NULL,
	[ServiceSubType] [nvarchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
	[ServiceID] [int] NOT NULL,
 CONSTRAINT [PK_Funding] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
ALTER TABLE [dbo].[Funders]  WITH CHECK ADD  CONSTRAINT [FK_Funding_Services] FOREIGN KEY([ServiceID])
REFERENCES [dbo].[Services] ([ID])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[Funders] CHECK CONSTRAINT [FK_Funding_Services]
-- end table Funder

